package com.miracle.film.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.miracle.film.mapper.FlmActorMapper;
import com.miracle.film.domain.FlmActor;
import com.miracle.film.service.IFlmActorService;

/**
 * 演员导演Service业务层处理
 * 
 * @author miracle
 * @date 2022-12-30
 */
@Service
public class FlmActorServiceImpl implements IFlmActorService 
{
    @Autowired
    private FlmActorMapper flmActorMapper;

    /**
     * 查询演员导演
     * 
     * @param id 演员导演主键
     * @return 演员导演
     */
    @Override
    public FlmActor selectFlmActorById(Integer id)
    {
        return flmActorMapper.selectFlmActorById(id);
    }

    /**
     * 查询演员导演列表
     * 
     * @param flmActor 演员导演
     * @return 演员导演
     */
    @Override
    public List<FlmActor> selectFlmActorList(FlmActor flmActor)
    {
        return flmActorMapper.selectFlmActorList(flmActor);
    }

    /**
     * 新增演员导演
     * 
     * @param flmActor 演员导演
     * @return 结果
     */
    @Override
    public int insertFlmActor(FlmActor flmActor)
    {
        flmActor.setCreateTime(DateUtils.getNowDate());
        return flmActorMapper.insertFlmActor(flmActor);
    }

    /**
     * 修改演员导演
     * 
     * @param flmActor 演员导演
     * @return 结果
     */
    @Override
    public int updateFlmActor(FlmActor flmActor)
    {
        flmActor.setUpdateTime(DateUtils.getNowDate());
        return flmActorMapper.updateFlmActor(flmActor);
    }

    /**
     * 批量删除演员导演
     * 
     * @param ids 需要删除的演员导演主键
     * @return 结果
     */
    @Override
    public int deleteFlmActorByIds(Integer[] ids)
    {
        return flmActorMapper.deleteFlmActorByIds(ids);
    }

    /**
     * 删除演员导演信息
     * 
     * @param id 演员导演主键
     * @return 结果
     */
    @Override
    public int deleteFlmActorById(Integer id)
    {
        return flmActorMapper.deleteFlmActorById(id);
    }
}
